#ifndef __POINT_H__
#define __POINT_H__

#include "iostream"

class Point
{
    friend std::ostream& operator<<(std::ostream& out, const Point& p);
public:
    Point(double x = 0, double y = 0);
    ~Point();

    Point& operator=(const Point& p);
    double operator[](int index);
    Point operator+(const Point& p);     // +
    Point& operator++();    // 前置 ++
    Point operator++(int);  // 后置 ++
    Point& operator--();    // 前置 --
    Point operator--(int);  // 后置 --
    Point& operator-();     // 负号
private:
    double x;
    double y;
};

#endif